import java.util.Scanner;
public class test3143 {
    public static void main(String [] args){
        //输入机票的原价，当前的月份以及是头等舱还是经济舱
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入机票的原价");
        int ticket=sc.nextInt();
        System.out.println("请输入当前的月份");
        int month=sc.nextInt();
        System.out.println("请输入当前是经济仓还是头等仓 0头等舱 1经济舱");
        int seat=sc.nextInt();
        //旺季(5-10月）头等舱九折经济舱八五折，淡季（11月到来年4月）头等舱7折经济舱6.5折；
        if(month<=10&&month>=5){
         if(seat==0){
             ticket=(int)(ticket*0.9);
         }
         if(seat==1){
             ticket=(int)(ticket*0.85);
         }

        }
       else if((month>0&&month<=4)||(month>=11&&month<=12)){
            if(seat==0){
                ticket=(int)(ticket*0.7);
            }
            if(seat==1){
                ticket=(int)(ticket*0.65);
            }
            else{
                System.out.println("输入有wu");
            }


    }
        System.out.println(ticket);
}}
